<?php

namespace common\modules\user;

use yii\base\BootstrapInterface;

/**
 * Users module bootstrap class.
 */
class Bootstrap implements BootstrapInterface
{
    /**
     * @inheritdoc
     */
    public function bootstrap($app)
    {
        // Add module URL rules.
        $app->urlManager->addRules(
            [
                '<_a:(login|signup|activation|recovery|recovery-confirmation|resend|fileapi-upload)>' => 'user/guest/<_a>',
                '<_a:logout>'                                                                         => 'user/user/<_a>',
                '<_a:email>'                                                                          => 'user/default/<_a>',
                'my/settings/<_a:[\w\-]+>'                                                            => 'user/user/<_a>',
            ],
            false
        );
    }
}
